﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SelectDialog.aspx.cs" Inherits="admin_newsSystem_CommonClass_SelectDialog" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="/admin/Css/Common.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jQuery1.7.js" type="text/javascript"></script>
    <script src="/Plugin/artDialog/jquery.artDialog.source.js?skin=blue" type="text/javascript"></script>
    <script src="/Plugin/artDialog/iframeTools.source.js" type="text/javascript"></script>
    <script src="/Plugin/Validform/js/Validform_v4.0.js" type="text/javascript"></script>
    <link href="/Plugin/Validform/css/style.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/sjn.1.js" type="text/javascript"></script>
    <script src="/Plugin/jqueryEasyui/jquery.easyui.min.js" type="text/javascript"></script>
    <link href="/Plugin/jqueryEasyui/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="/Plugin/jqueryEasyui/themes/icon.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript">
        $(function () {

            //初始化并加载列表中数据
            $('#tg').treegrid({
                url: 'Index.aspx?fun=GetClass&root=',
                idField: 'ID',
                treeField: 'Name',
                height: 250,
                columns: [[
                            { title: '分类名称', field: 'Name', width: 180 },
                            { title: '英文名称', field: 'EnName', width: 60, align: 'right' },
                            { title: '深度', field: 'Depth', width: 80 },
                            { title: '排序', field: 'Order', width: 80 }
                        ]]
            });


        });

        //分类选择事件重新加载列表中数据
        var ClsType_onSelect = function (rec) {
            //重新加载数据
            $('#tg').treegrid("reload", { type: rec.ID });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="width: 410px;">
        <div style="height: 26px;">
            <span>分类类型：</span><input id="iptClsType" class="easyui-combobox" name="dept" data-options="valueField:'ID',textField:'Name',url:'index.aspx?fun=GetClassType',onSelect:ClsType_onSelect">
        </div>
        <table id="tg" class="easyui-treegrid">
        </table>
        <div class="aui_buttons">
            <button id="c_ok" class="aui_state_highlight" type="submit" style="float: right;">
                确&nbsp;定
            </button>
        </div>
    </div>
    </form>
</body>
</html>
